package 耿翔宇;

import java.io.File;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import cn.hutool.core.io.FileUtil;

public class Sort {

	public static void main(String[] args) {
		List<String> rl = FileUtil.readUtf8Lines(new File("sort.txt"));
		rl = rl.stream().filter(s->!s.equals("")).sorted((s1,s2)->s1.charAt(0)-s2.charAt(0)).collect(Collectors.toList());
		FileUtil.writeLines(rl, new File("sort.txt"), "utf-8");
	}

}
